package Lianxi;

public class Lianxi3 {
    private String title;
    private String author;
    private String press;
    private double price;

    public Lianxi3(String press,double price){
        this.getTitle();
        this.getAuthor();
        this.press=press;
        this.price=price;
    }
    public void getTitle() {
        title = "查理九世11111111111111";
    }


    public String getAuthor() {
        return author="奥斯特洛夫斯基";
    }

    public String getPress() {
        return press;
    }

    public void setPress() {
        this.press = press;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
        if(price>10){
            this.price=price;
        }else{
            System.out.println("无效");
        }
    }
    public void showBookinfo(){
        System.out.println("书名："+title+",作者："+author+",出版社:"+press+",价格："+price);
    }
}
